package com.luo.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Results {
    private Integer code;
    // 状态码
    private String message;
    // 成功或失败的提示信息
    private Object data;
    // 返回的数据

    public static Results success(){
        return new  Results(1, "success", null);
    }

    public static Results success(Object data){
        return new  Results(1, "success", data);
    }

    public static Results error(String message){
        return new  Results(0, message, null);
    }


}
